/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package org.openbookformat.chaptersviewer;

import org.openbookformat.project.Chapter;
import org.openide.loaders.DataObject;
import org.openide.nodes.AbstractNode;
import org.openide.nodes.Children;
import org.openide.util.lookup.Lookups;

/**
 *
 * @author MUFEED
 */
class ChapterNode extends AbstractNode {
    Chapter chapter;

    public ChapterNode(Chapter chapter, DataObject dObj) {
        super(Children.LEAF, Lookups.fixed(new Object[] {
           chapter, dObj}) );
        this.chapter = chapter;
    }

    public Chapter getChpater() {
        return chapter;
    }

    @Override
    public String getDisplayName() {
        return chapter.getTitle();
    }

}
